From de2d56e9c7abe5e581fa2f0abaaabe6b8d0b802c Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Fri, 19 Aug 2016 20:04:59 +0300 Subject: [PATCH] extensions: fast-float: babl_lookup(): use 1UL, not just 1 Fixes: fast-float.c:81:35: runtime error: left shift of 1 by 31 places cannot be represented in type 'int' and fast-float.c:91:34: runtime error: left shift of 1 by 31 places cannot be represented in type 'int' --- extensions/fast-float.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/fast-float.c b/extensions/fast-float.c index fd7fb9f..04802a9 100644 --- a/extensions/fast-float.c +++ b/extensions/fast-float.c @@ -78,7 +78,7 @@ babl_lookup (BablLookup *lookup, else return lookup->function (number, lookup->data); - if (!(lookup->bitmask[i/32] & (1<<(i & 31)))) + if (!(lookup->bitmask[i/32] & (1UL<<(i & 31)))) { /* XXX: should look up the value in the middle of the range * that yields a given value, @@ -88,7 +88,7 @@ babl_lookup (BablLookup *lookup, * lookup table.. */ lookup->table[i]= lookup->function (number, lookup->data); - lookup->bitmask[i/32] |= (1<<(i & 31)); + lookup->bitmask[i/32] |= (1UL<<(i & 31)); } return lookup->table[i]; -- 2.30.2